public class Teacher extends person{
    //课程
    private String course;


    /**
     * 授课
     */
    public void teach(){
        System.out.println(getAge() + "在教" + course);
    }

    public String getCourse() {
        return course;
    }

    public void setCourse(String course) {
        this.course = course;
    }

    public Teacher(String course) {
        this.course = course;
    }

    public Teacher(String name, int age, String gender, String course) {
        super(name, age, gender);
        this.course = course;
    }

    public Teacher(){

    }
}
